<script type="text/javascript">
<!--
<?php 
$all = count($model);
$addresses = $images = $names = $urls = $prices = '';
foreach ($model as $key => $booking) :
	$object = $booking->object;
	$address		= $object->country->name.', '.$object->city->name.', '.$object->street.' '.$object->house .'/'.$object->apartment;
	$image			= $object->mainImage ? 
		$this->material_image_src($object->mainImage->id, $object->mainImage->name, '205', 'images/'.$object->user_id.'/'.$object->id) : 
			$this->material_image_src(0, 'noimage.gif', '205', '');
	$url 			= Yii::app()->createUrl('cataloge/view', array('id'=>$object->id));
	$addresses 		.=  $key+1!=$all ? '"'.$address.'", ' : '"'.$address.'"';
	$images 		.=  $key+1!=$all ? '"'.$image.'", ' : '"'.$image.'"';
	$names 			.=  $key+1!=$all ? '"'.$object->name.'", ' : '"'.$object->name.'"';
	$urls 			.=  $key+1!=$all ? '"'.$url.'", ' : '"'.$url.'"';
	$prices 			.=  $key+1!=$all ? '"'.$object->price.'", ' : '"'.$object->price.'"';
endforeach;
?>
window.addresses = [<?php echo $addresses;?>];
window.images = [<?php echo $images;?>];
window.names = [<?php echo $names;?>];
window.urls = [<?php echo $urls;?>];
window.prices = [<?php echo $prices;?>];
//-->
</script>
<div id="map_canvas" style="width:800px; height:500px; "></div>
<div class="cl list-object">
<!-- content -->
	<div class="content_holder fl">
		<div id="content">
			<div class="booking_btn br5">
				<a href="<?php echo Yii::app()->user->id; ?>" id="trips_all"><?php echo Yii::t('main', 'All Trips'); ?></a>
				<a href="<?php echo Yii::app()->user->id; ?>" id="trips"><?php echo Yii::t('main', 'Trips'); ?></a>
				<a href="<?php echo Yii::app()->user->id; ?>" id="trips_old"><?php echo Yii::t('main', 'Old Trips'); ?></a>
			</div>
			<div id="trips_list">
				<?php $this->renderPartial('_tripsList', array('model'=>$model)) ?>
			</div>
			
			<div class="clear"></div>
		</div>
	</div>
	<!-- Right col -->
	<div id="right" class="br5">
		<div class="order_form">
			<!-- right menu Cabinet -->
			<?php $this->renderPartial('../users/_menu_r_Cabinet'); ?>
		</div>
	</div>
</div>